<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            background-color: antiquewhite;

        }

        html,
        body {
            width: 100%;
            height: 100%;
        }

        body {
            display: flex;
            flex-direction: row;
            align-items: center;
            justify-content: center;
        }

        .square {
            width: 100px;
            height: 100px;
            background-color: red;
            transform: rotate(45deg);
            transform-origin: center;
            position: relative;
            box-shadow: 0 0 15px red;
            animation: myaction  1s alternate infinite;

        }

        .square::before {
            content: "";
            background-color: red;
            width: 100%;
            height: 100%;
            position: absolute;
            left: 0;
            top: -50px;
            /* border-radius: 100px 100px 0 0%; */
            border-radius: 100%;
            box-shadow: 0 0 15px red;

        }

        .square::after {
            content: "";
            background-color: red;
            width: 100%;
            height: 100%;
            position: absolute;
            left: -50px;
            top: 0;
            /* border-radius: 100px 0 0 100px; */
            border-radius: 100%;
            box-shadow: 0 0 15px red;
        }

        @keyframes myaction {
            0% {
                transform: rotate(45deg) scale(1);
            }

            /* 25% {
                transform: rotate(45deg) scale(1.2);
            }

            50% {
                transform: rotate(45deg) scale(1.3);
            }

            75% {
                transform: rotate(45deg) scale(1.2);
            } */

            100% {
                transform: rotate(45deg) scale(1.5);
            }
        }
    </style>
</head>

<body>
    <div class="heart">
        <div class="square"></div>
    </div>

</body>

</html>